Skip to content

Fix ink label URL construction for .zarr segments#807

Open
pallman14 wants to merge 1 commit intoScrollPrize:mainfrom
pallman14:fix-inklabel-url-construction
Open

Fix ink label URL construction for .zarr segments#807
pallman14 wants to merge 1 commit intoScrollPrize:mainfrom
pallman14:fix-inklabel-url-construction

Conversation

@pallman14
Copy link
Copy Markdown

Summary

  • Fixes ink label download failing with 404 for segments with .zarr URLs
  • The download_inklabel() method was including .zarr in the filename

Problem

When segment URLs end with .zarr/, the code was constructing:

https://dl.ash2txt.org/.../20230827161847.zarr_inklabels.png  → 404

Instead of:

https://dl.ash2txt.org/.../20230827161847_inklabels.png  → 200

Fix

Strip the .zarr extension from segment_id_str before constructing the ink label filename (2 lines added).

Testing

from vesuvius import Volume
segment = Volume(type='segment', segment_id=20230827161847, scroll_id=1, download_only=True, verbose=True)
print(segment.inklabel.shape)  # (9216, 5120) - now loads correctly
print(segment.inklabel.sum())  # 942433518 - actual data, not zeros

Impact

This fixes Tutorial 5 (Ink Detection) which was reported broken in Discord #newbie-questions.

The download_inklabel() method was constructing incorrect URLs for
ink label PNG files when the segment URL ended with .zarr extension.

Before: .../20230827161847.zarr_inklabels.png (404 Not Found)
After:  .../20230827161847_inklabels.png (200 OK)

The fix strips the .zarr extension from the segment ID before
constructing the ink label filename.

This fixes Tutorial 5 (Ink Detection) which was reported broken
in Discord #newbie-questions.
@pallman14 pallman14 requested a review from jrudolph as a code owner April 7, 2026 03:38
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

@pallman14 is attempting to deploy a commit to the scroll Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant